import request from '@/utils/request';

/**
 * 文件上传
 * @param file 文件对象
 */
export function uploadFile(file) {
  const formData = new FormData();
  formData.append('file', file);

  return request({
    url: '/dev-api/files/upload',
    method: 'post',
    data: formData,
  });
}

// 获取文件列表
export function avatarPath(params) {
  return request({
    url: '/dev-api/files/'+params,
    method: 'get',
  });
}